﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.ServiceProcess;
using System.Text;
using System.Windows.Forms;

namespace ExcelRefreshService
{
    public partial class DefineCredentials : Form
    {
        public DefineCredentials()
        {
            InitializeComponent();
        }

        public ServiceAccount ServiceAccount
        {
            get
            {
                return (ServiceAccount) cbAccountType.SelectedIndex;
            }
        }

        public string UserName { get { return tbUsername.Text; } }
        public string Password { get { return tbPassword.Text; } }

        private void DefineCredentials_Load(object sender, EventArgs e)
        {
            cbAccountType.SelectedIndex = 0;
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.OK;
            Close();
        }  
    }
}
